Optimal. Leaf size=151 \[ \frac {b d (d e-c f) \text {ArcTan}(c+d x)}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}-\frac {a+b \text {ArcTan}(c+d x)}{f (e+f x)}+\frac {b d \log (e+f x)}{d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2}-\frac {b d \log \left (1+c^2+2 c d x+d^2 x^2\right )}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {5153, 2007,
719, 31, 648, 632, 210, 642} \begin {gather*} -\frac {a+b \text {ArcTan}(c+d x)}{f (e+f x)}+\frac {b d \text {ArcTan}(c+d x) (d e-c f)}{f \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )}-\frac {b d \log \left (c^2+2 c d x+d^2 x^2+1\right )}{2 \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )}+\frac {b d \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 210
Rule 632
Rule 642
Rule 648
Rule 719
Rule 2007
Rule 5153
Rubi steps
\begin {align*} \int \frac {a+b \tan ^{-1}(c+d x)}{(e+f x)^2} \, dx &=-\frac {a+b \tan ^{-1}(c+d x)}{f (e+f x)}+\frac {(b d) \int \frac {1}{(e+f x) \left (1+(c+d x)^2\right )} \, dx}{f}\\ &=-\frac {a+b \tan ^{-1}(c+d x)}{f (e+f x)}+\frac {(b d) \int \frac {1}{(e+f x) \left (1+c^2+2 c d x+d^2 x^2\right )} \, dx}{f}\\ &=-\frac {a+b \tan ^{-1}(c+d x)}{f (e+f x)}+\frac {(b d) \int \frac {d^2 e-2 c d f-d^2 f x}{1+c^2+2 c d x+d^2 x^2} \, dx}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}+\frac {(b d f) \int \frac {1}{e+f x} \, dx}{d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2}\\ &=-\frac {a+b \tan ^{-1}(c+d x)}{f (e+f x)}+\frac {b d \log (e+f x)}{d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2}-\frac {(b d) \int \frac {2 c d+2 d^2 x}{1+c^2+2 c d x+d^2 x^2} \, dx}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}+\frac {\left (b d^2 (d e-c f)\right ) \int \frac {1}{1+c^2+2 c d x+d^2 x^2} \, dx}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}\\ &=-\frac {a+b \tan ^{-1}(c+d x)}{f (e+f x)}+\frac {b d \log (e+f x)}{d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2}-\frac {b d \log \left (1+c^2+2 c d x+d^2 x^2\right )}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}-\frac {\left (2 b d^2 (d e-c f)\right ) \text {Subst}\left (\int \frac {1}{-4 d^2-x^2} \, dx,x,2 c d+2 d^2 x\right )}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}\\ &=\frac {b d (d e-c f) \tan ^{-1}(c+d x)}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}-\frac {a+b \tan ^{-1}(c+d x)}{f (e+f x)}+\frac {b d \log (e+f x)}{d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2}-\frac {b d \log \left (1+c^2+2 c d x+d^2 x^2\right )}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.16, size = 121, normalized size = 0.80 \begin {gather*} \frac {-\frac {a+b \text {ArcTan}(c+d x)}{e+f x}+\frac {b d (i (-d e+(i+c) f) \log (i-c-d x)+i (d e+i f-c f) \log (i+c+d x)+2 f \log (d (e+f x)))}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 234, normalized size = 1.55
method | result | size |
derivativedivides | \(\frac {\frac {a \,d^{2}}{\left (c f -d e -f \left (d x +c \right )\right ) f}+\frac {b \,d^{2} \arctan \left (d x +c \right )}{\left (c f -d e -f \left (d x +c \right )\right ) f}-\frac {b \,d^{2} \ln \left (1+\left (d x +c \right )^{2}\right )}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )}-\frac {b \,d^{2} \arctan \left (d x +c \right ) c}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}+\frac {b \,d^{3} \arctan \left (d x +c \right ) e}{f \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )}+\frac {b \,d^{2} \ln \left (c f -d e -f \left (d x +c \right )\right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}}{d}\) | \(234\) |
default | \(\frac {\frac {a \,d^{2}}{\left (c f -d e -f \left (d x +c \right )\right ) f}+\frac {b \,d^{2} \arctan \left (d x +c \right )}{\left (c f -d e -f \left (d x +c \right )\right ) f}-\frac {b \,d^{2} \ln \left (1+\left (d x +c \right )^{2}\right )}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )}-\frac {b \,d^{2} \arctan \left (d x +c \right ) c}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}+\frac {b \,d^{3} \arctan \left (d x +c \right ) e}{f \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )}+\frac {b \,d^{2} \ln \left (c f -d e -f \left (d x +c \right )\right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}}{d}\) | \(234\) |
risch | \(\frac {i b \ln \left (1+i \left (d x +c \right )\right )}{2 f \left (f x +e \right )}+\frac {i \ln \left (\left (c d f -d^{2} e -3 i d f \right ) x -2 i c f -i d e +c^{2} f -c d e +3 f \right ) b \,d^{2} e f x -i \ln \left (\left (-c d f +d^{2} e -3 i d f \right ) x -2 i c f -i d e -c^{2} f +c d e -3 f \right ) b \,d^{2} e f x -i b \,c^{2} f^{2} \ln \left (1-i \left (d x +c \right )\right )+i \ln \left (\left (-c d f +d^{2} e -3 i d f \right ) x -2 i c f -i d e -c^{2} f +c d e -3 f \right ) b c d e f +2 \ln \left (-f x -e \right ) b d \,f^{2} x +2 \ln \left (-f x -e \right ) b d e f -2 a \,c^{2} f^{2}+4 a c d e f -2 a \,d^{2} e^{2}-2 a \,f^{2}-i b \,d^{2} e^{2} \ln \left (1-i \left (d x +c \right )\right )+i \ln \left (\left (c d f -d^{2} e -3 i d f \right ) x -2 i c f -i d e +c^{2} f -c d e +3 f \right ) b \,d^{2} e^{2}+i \ln \left (\left (-c d f +d^{2} e -3 i d f \right ) x -2 i c f -i d e -c^{2} f +c d e -3 f \right ) b c d \,f^{2} x -i \ln \left (\left (-c d f +d^{2} e -3 i d f \right ) x -2 i c f -i d e -c^{2} f +c d e -3 f \right ) b \,d^{2} e^{2}-\ln \left (\left (c d f -d^{2} e -3 i d f \right ) x -2 i c f -i d e +c^{2} f -c d e +3 f \right ) b d \,f^{2} x -\ln \left (\left (c d f -d^{2} e -3 i d f \right ) x -2 i c f -i d e +c^{2} f -c d e +3 f \right ) b d e f +2 i b c d e f \ln \left (1-i \left (d x +c \right )\right )-i b \,f^{2} \ln \left (1-i \left (d x +c \right )\right )-i \ln \left (\left (c d f -d^{2} e -3 i d f \right ) x -2 i c f -i d e +c^{2} f -c d e +3 f \right ) b c d \,f^{2} x -i \ln \left (\left (c d f -d^{2} e -3 i d f \right ) x -2 i c f -i d e +c^{2} f -c d e +3 f \right ) b c d e f -\ln \left (\left (-c d f +d^{2} e -3 i d f \right ) x -2 i c f -i d e -c^{2} f +c d e -3 f \right ) b d \,f^{2} x -\ln \left (\left (-c d f +d^{2} e -3 i d f \right ) x -2 i c f -i d e -c^{2} f +c d e -3 f \right ) b d e f}{2 \left (f x +e \right ) \left (c f -d e +i f \right ) \left (c f -d e -i f \right ) f}\) | \(830\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 186, normalized size = 1.23 \begin {gather*} \frac {1}{2} \, {\left (d {\left (\frac {2 \, {\left (c d f - d^{2} e\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{{\left (2 \, c d f^{2} e - {\left (c^{2} + 1\right )} f^{3} - d^{2} f e^{2}\right )} d} + \frac {\log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{2 \, c d f e - {\left (c^{2} + 1\right )} f^{2} - d^{2} e^{2}} - \frac {2 \, \log \left (f x + e\right )}{2 \, c d f e - {\left (c^{2} + 1\right )} f^{2} - d^{2} e^{2}}\right )} - \frac {2 \, \arctan \left (d x + c\right )}{f^{2} x + f e}\right )} b - \frac {a}{f^{2} x + f e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.20, size = 195, normalized size = 1.29 \begin {gather*} \frac {4 \, a c d f e - 2 \, a d^{2} e^{2} - 2 \, {\left (a c^{2} + a\right )} f^{2} - 2 \, {\left (b c d f^{2} x + {\left (b c^{2} + b\right )} f^{2} - {\left (b d^{2} f x + b c d f\right )} e\right )} \arctan \left (d x + c\right ) - {\left (b d f^{2} x + b d f e\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) + 2 \, {\left (b d f^{2} x + b d f e\right )} \log \left (f x + e\right )}{2 \, {\left ({\left (c^{2} + 1\right )} f^{4} x + d^{2} f e^{3} + {\left (d^{2} f^{2} x - 2 \, c d f^{2}\right )} e^{2} - {\left (2 \, c d f^{3} x - {\left (c^{2} + 1\right )} f^{3}\right )} e\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.83, size = 127, normalized size = 0.84 \begin {gather*} \frac {b\,d\,\ln \left (e+f\,x\right )}{d^2\,e^2-2\,c\,d\,e\,f+\left (c^2+1\right )\,f^2}-\frac {b\,\mathrm {atan}\left (c+d\,x\right )}{f\,\left (e+f\,x\right )}-\frac {a}{x\,f^2+e\,f}-\frac {b\,d\,\ln \left (c+d\,x-\mathrm {i}\right )\,1{}\mathrm {i}}{2\,f\,\left (d\,e-c\,f+f\,1{}\mathrm {i}\right )}-\frac {b\,d\,\ln \left (c+d\,x+1{}\mathrm {i}\right )}{2\,f\,\left (f-c\,f\,1{}\mathrm {i}+d\,e\,1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________